<?php
/**
 * Description of checker
 *
 * @author Honza
 */
class checker {
    //put your code here
    public static function checkInt($var)
    {
        if(!ctype_digit($var))
        {
            throw new UnexpectedValueException('unexpected type of variable!');
        } 
    }
    public static function checkString($string)
    {
        throw new Exception('function not implemented!');
    }
    public static function checkEmail($email)
    {
        
        if(preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $email))        
            return true;
        
            else
                throw new UnexpectedValueException('bad email address');
        
    }
    public static function checkText($text)
    {
        throw new Exception('function not implemented!');
    }
}

?>
